package com.sgb.kjwl.model.entity;

import com.contrarywind.interfaces.IPickerViewData;
import com.google.gson.annotations.SerializedName;

import java.util.List;

public class ArrEntity {
    @SerializedName("name")
    private String name;
    @SerializedName("id")
    private String id;
    @SerializedName("type")
    private List<ChildType> type;
    @SerializedName("content")
    private String content;
    /**
     * 属性值是否必填
     */
    @SerializedName("isfill")
    private Integer isfill;

    public String getContent() {
        if (content == null)
            return "";
        return content;
    }

    public Integer getIsfill() {
        return isfill;
    }

    public void setIsfill(Integer isfill) {
        this.isfill = isfill;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public List<ChildType> getType() {
        return type;
    }

    public void setType(List<ChildType> type) {
        this.type = type;
    }

    public class ChildType implements IPickerViewData {
        @SerializedName("cname")
        private String cname;
        @SerializedName("cid")
        private String cid;
        private boolean isSelect;

        public String getCname() {
            return cname;
        }

        public void setCname(String cname) {
            this.cname = cname;
        }

        public String getCid() {
            return cid;
        }

        public void setCid(String cid) {
            this.cid = cid;
        }

        public boolean isSelect() {
            return isSelect;
        }

        public void setSelect(boolean select) {
            isSelect = select;
        }

        @Override
        public String getPickerViewText() {
            return cname;
        }
    }

}
